package com.psool.service.impl;

import com.psool.dao.WeiBoDao;
import com.psool.entity.WeiBo;
import com.psool.service.WeiBoService;

import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;

public class WeiBoServiceImpl implements WeiBoService {

    @Inject
    private WeiBoDao weiBoDao;

    @Override
    public List<WeiBo> getList() {
        Iterable<WeiBo> all = weiBoDao.findAll();
        List<WeiBo> list = new ArrayList<>();
        all.forEach(s -> {
            list.add(s);
        });

        return list;
    }
}
